


function getMessage(){
    var xhr=null;
    if(window.XMLHttpRequest){
        xhr=new XMLHttpRequest();
    }else{
        xhr=new ActiveXObject("Microsoft.XMLHttp");
    }
    xhr.open("get","https://developer.duyiedu.com/edu/groupChat/getMsgList",false);
    xhr.onreadystatechange=function(){
        if(xhr.onreadystatechange==4 && xhr.status==200){
            document.getElementById('test').innerHTML=xhr.responseText;
            var data=JSON.parse(xhr.responseText);
            console.log(data);
        }
    }

    xhr.send();
}


getMessage();